<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class AuthToken</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class AuthToken</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Client used to retrieve authentication tokens from the Client Login API.</p>
	<ul class="tags">
				<li><span class="field">link:</span> <a href="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html">http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_common---src---Google---Api---Ads---Common---Util---AuthToken.php.html">/common/src/Google/Api/Ads/Common/Util/AuthToken.php</a> (line <span class="field">34</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<a href="#DEFAULT_ACCOUNT_TYPE" title="details" class="const-name">DEFAULT_ACCOUNT_TYPE</a> = 					<span class="var-type"> 'GOOGLE'</span>

				</div>
								<div class="const-title">
					<a href="#DEFAULT_SERVER" title="details" class="const-name">DEFAULT_SERVER</a> = 					<span class="var-type"> 'https://www.google.com'</span>

				</div>
							</div>
		</div>
	</div>


	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
									<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																												
												<div class="method-definition">
											<span class="method-result">AuthToken</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$password</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$service</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$source</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$accountType</span> = <span class="var-default">NULL</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$server</span> = <span class="var-default">NULL</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$captchaToken</span> = <span class="var-default">NULL</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$captchaResponse</span> = <span class="var-default">NULL</span>], [<span class="var-type"><a href="../../GoogleApiAdsCommon/Util/CurlUtils.html">CurlUtils</a></span>&nbsp;<span class="var-name">$curlUtils</span> = <span class="var-default">NULL</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#GetAuthToken" title="details" class="method-name">GetAuthToken</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#GetServer" title="details" class="method-name">GetServer</a>
										()
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">72</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates a new instance of this authentication token utility class.</p>
	
	<div class="method-signature">
		<span class="method-result">AuthToken</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$password</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$service</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$source</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$accountType</span> = <span class="var-default">NULL</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$server</span> = <span class="var-default">NULL</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$captchaToken</span> = <span class="var-default">NULL</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$captchaResponse</span> = <span class="var-default">NULL</span>], [<span class="var-type"><a href="../../GoogleApiAdsCommon/Util/CurlUtils.html">CurlUtils</a></span>&nbsp;<span class="var-name">$curlUtils</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$email</span><span class="var-description">: the email of the user</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$password</span><span class="var-description">: the password of the user</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$service</span><span class="var-description">: the service name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$source</span><span class="var-description">: the source name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$accountType</span><span class="var-description">: the account type, defaults to 'GOOGLE'</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$server</span><span class="var-description">: the server to make the request to, defaults      to 'https://www.google.com'</span>			</li>
					<li>
				<span class="var-type"><a href="../../GoogleApiAdsCommon/Util/CurlUtils.html">CurlUtils</a></span>
				<span class="var-name">$curlUtils</span><span class="var-description">: an instance of CurlUtils</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$captchaToken</span><span class="var-description">: captchaToken the token return with a CAPTCHA challenge</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$captchaResponse</span><span class="var-description">: captchaResponse the response to a CAPTCHA challenge</span>			</li>
				</ul>
		
			
	</div>
<a name="methodGetAuthToken" id="GetAuthToken"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">GetAuthToken</span> (line <span class="line-number">93</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Peforms a POST to get the auth token and then parses the result.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the auth token</li>
				<li><span class="field">throws:</span> AuthTokenException if an error occurs during authentication</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			GetAuthToken
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodGetServer" id="GetServer"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">GetServer</span> (line <span class="line-number">170</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the server to make requests to.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the server to make requests to</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			GetServer
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constDEFAULT_ACCOUNT_TYPE" id="DEFAULT_ACCOUNT_TYPE"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<span class="const-title">
			<span class="const-name">DEFAULT_ACCOUNT_TYPE</span>
			 = <span class="const-default"> 'GOOGLE'</span>
			(line <span class="line-number">40</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The default account type for authentication requests.</p>
	
	
</div>
<a name="constDEFAULT_SERVER" id="DEFAULT_SERVER"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<span class="const-title">
			<span class="const-name">DEFAULT_SERVER</span>
			 = <span class="const-default"> 'https://www.google.com'</span>
			(line <span class="line-number">46</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The default server to make authentication requests to.</p>
	
	
</div>
						
		</div>
	</div>

	<p class="notes" id="credit">
		Documentation generated by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>